<template>
  <el-table :data="tableData" :height="height" :style="style">
    <el-table-column
      v-for="(item, index) in optionsArr"
      :key="index"
      :prop="item.prop"
      :label="item.label"
      :width="item.width"
    >
      <template #default="scope" v-if="item.slot">
        <div v-html="item.slot(scope)"></div>
      </template>
    </el-table-column>
  </el-table>
</template>
<script setup>
const props = defineProps(["options"]);
const { tableData, style, height,optionsArr} = props.options;
// const optionsArr = props.options.optionsArr.map(item =>{
//   if(item.slot) return item
//   item.slot = ()=>{}
//   return item
// })
</script>